| Conditions | 6 |
| Paths | 5 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | |||
| 4 | self.decideBlackListWhiteList = function (inDecisionValue, inEvaluatedValueForBlackList, inBlackListArray, inEvaluatedValueForWhiteList, inWhiteListArray, inValueToEvaluate) { |
||
| 5 | var outResultBoolean = false; |
||
| 6 | var switchChoices = { |
||
|
|
|||
| 7 | 'BlackList': inEvaluatedValueForBlackList, |
||
| 8 | 'WhiteList': inEvaluatedValueForWhiteList |
||
| 9 | }; |
||
| 10 | switch (inDecisionValue) { |
||
| 11 | case switchChoices['BlackList']: |
||
| 12 | if (inBlackListArray.indexOf(inValueToEvaluate) === -1) { |
||
| 13 | outResultBoolean = true; |
||
| 14 | } |
||
| 15 | break; |
||
| 16 | case switchChoices['WhiteList']: |
||
| 17 | if (inWhiteListArray.indexOf(inValueToEvaluate) > -1) { |
||
| 18 | outResultBoolean = true; |
||
| 19 | } |
||
| 20 | break; |
||
| 21 | default: |
||
| 22 | // intentionally left black as is not supposed to change default valuation |
||
| 23 | break; |
||
| 24 | } |
||
| 25 | return outResultBoolean; |
||
| 26 | }; |
||
| 27 | }; |
||
| 30 |